﻿//-----------------------------------------------------------------------
// <copyright file="BaseRule.cs" company="COMPANY">
//     Copyright (c) COPYRIGHT. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace CodeQualityExtension.UnitTestRules
{
    using System;
    using Microsoft.FxCop.Sdk;
    
    /// <summary>
    /// Base rule for FxCop analysis
    /// </summary>
    public class BaseRule : BaseIntrospectionRule
    {
        /// <summary>
        /// Initializes a new instance of the BaseRule class
        /// </summary>
        /// <param name="createdType">Type which is created by this constructor. For example
        /// for derived class called MyRule, new instance is created as follows
        /// <code>
        /// MyRule rule = new MyRule(typeof(MyRule));
        /// </code>
        /// </param>
        public BaseRule(Type createdType) : base(
            createdType.Name,
            typeof(BaseRule).Namespace + ".Rules.xml",
            createdType.Assembly)
        {
        }
    }
}
